﻿Imports lbGlobalcom
Public Class fCierrePeriodo

    Private Sub btnSalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSalir.Click
        Me.Close()
    End Sub

    Private Sub fCierrePeriodo_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            Dim Per As New cPeriodos
            txtPeriodoActual.Text = Per.IDPERIODO
            Per.NextPeriodo()
            txtNuevoPeriodo.Text = Per.IDPERIODO
            Per = Nothing
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub btnCierra_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCierra.Click
        Try
            Dim CierrPer As New cCierrePeriodo(txtPeriodoActual.Text)
            CierrPer = Nothing
            MessageBox.Show("Se cerro periodo con exito", "Cierre Periodo", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub
End Class